<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
        <meta name="Date" content="$Date: 2009-08-09 19:05:59 +0530 (Sun, 09 Aug 2009) $" />
        <title>AceUnit Glossary</title>
        <link rel="Stylesheet" type="text/css" href="sitestyle.css" />
        <meta name="X-Subversion-Id" content="$Id: glossary.xhtml 514 2009-08-09 13:35:59Z christianhujer $" />
    </head>
    <body>
        <h2>Products</h2>
        <dl>
            <dt>AceUnit</dt>
            <dd>
                Advanced C and Embedded Unit.
                A framework for Unit Testing in C, based on the ideas of JUnit 4.x and the experience with usage of CUnit and EmbUnit.
                Supports Unit Testing on embedded systems as well as in "normal" development.
                <br />
                URL: <a href="http://aceunit.sourceforge.net/">http://aceunit.sourceforge.net/</a>
            </dd>
            <dt>CUnit</dt>
            <dd>
                A framework for Unit Testing in C, based on the ideas of JUnit 3.x.
                Not suited for embedded systems. (E.g. Strings as messages)
                <br />
                URL: <a href="http://cunit.sourceforge.net/">http://cunit.sourceforge.net/</a>
            </dd>
            <dt>EmbUnit</dt>
            <dd>
                A framework for Unit Testing in C, based on the ideas of JUnit 3.x and CUnit.
                Only suited for embedded systems. (E.g. ints as messages)
                <br />
                URL: <a href="http://embunit.sourceforge.net/">http://embunit.sourceforge.net/</a>
            </dd>
            <dt>Check</dt>
            <dd>
                A framework for Unit Testing in C, based on the ideas of JUnit 3.x.
                Well suited for POSIX environments (takes advantage of <code>fork()</code>).
                <br />
                URL: <a href="http://check.sourceforge.net/">http://check.sourceforge.net/</a>
            </dd>
            <dt>JUnit</dt>
            <dd>
                A framework for Unit Testing in Java.
                <br />
                URL: <a href="http://junit.sourceforge.net/">http://junit.sourceforge.net/</a>
            </dd>
        </dl>
        <h2>Terms</h2>
        <dl>
            <dt>After</dt>
            <dd>
                After is a Method in a Fixture that will be executed after each Test Case independently of whether or not that Test Case was successful.
                It is part of the Test Case Setup.
            </dd>
            <dt>AfterClass</dt>
            <dd>
                AfterClass is a Method in a Fixture that will be executed once for that Fixture after the last Test Case.
                It is part of the Fixture Setup.
            </dd>
            <dt>Before</dt>
            <dd>
                Before is a Method in a Fixture that will be executed before each Test Case.
                It is part of the Test Case Setup.
            </dd>
            <dt>BeforeClass</dt>
            <dd>
                BeforeClass is a Method in a Fixture that will be executed once for that Fixture before the first Test Case.
                It is part of the Fixture Setup.
            </dd>
            <dt>Class</dt>
            <dd>
                In this environment usually used as a synonym for Fixture.
            </dd>
            <dt>Fixture</dt>
            <dd>
                Logic View:
                A Fixture (or "Class") is a Suite that contains Test Cases.
                <br />
                Physical View:
                A Fixture is a C Source that contains at least one method (function) annotated with <code>A_Test</code>.
                <br />
                Besides Test Cases Fixtures can also contain a Test Case Setup and a Fixture Setup.
            </dd>
            <dt>Fixture Setup</dt>
            <dd>
                Logic View:
                The Fixture Setup is a preparation / cleanup for a fixture that is executed once for the fixture.
                <br />
                Physical View:
                The Fixture Setup preparation steps are Methods annotated with <code>A_BeforeClass</code>.
                The Fixture Setup cleanup steps are Methods annotated with <code>A_AfterClass</code>.
            </dd>
            <dt>Generator</dt>
            <dd>
                The Generator is a tool which scans logic Suites and generates all physical information required for the Runner to run the Suites.
            </dd>
            <dt>Logger</dt>
            <dd>
                A Logger is an implementation of a C interface which will be called by the Runner upon certain events which are:
                <ul>
                    <li>Runner started</li>
                    <li>Suite started.</li>
                    <li>Fixture started.</li>
                    <li>Test Case started.</li>
                    <li>Test Case failed.</li>
                    <li>Test Case ended.</li>
                    <li>Fixture ended.</li>
                    <li>Suite ended.</li>
                    <li>Runner ended.</li>
                </ul>
                Loggers are configurable and needn't necessary implement all of these functions.
            </dd>
            <dt>Method</dt>
            <dd>
                Synonym for function.
                The devs of AceUnit design with OO in their minds.
                Thus they tend to speak of methods instead of functions.
                Technically, that's just a different term with a different point of view / perspective.
            </dd>
            <dt>Runner</dt>
            <dd>
                The Runner performs one or more Suites.
                The Suites will be traversed recursively to their Fixtures.
                Each fixture will be executed in the following order:
                <ol>
                    <li>Perform all BeforeClass Methods.</li>
                    <li>For each Test Case
                        <ol>
                            <li>Perform all Before Methods.</li>
                            <li>Perform the Test Case Method.</li>
                            <li>Perform all After Methods.</li>
                        </ol>
                    </li>
                    <li>Perform all AfterClass Methods.</li>
                </ol>
                <p>
                    Within above order, the Methods will always be executed in the same order as they were found by the Generator in the C Source.
                </p>
            </dd>
            <dt>Suite</dt>
            <dd>
                Logic View:
                A Suite is an indirect collection of test cases that contains Suites.
                <br />
                Physical View: A Suite is either 
                <br />
                Explanation:
                A Fixture is a special kind of Suite.
                A Suite that is not a Fixture will only contain other Suites.
                A Suite that is a Fixture will only contain Test Cases.
                Thus a Suite contains Test Cases, either directly because the Suite is a Fixture or indirectly because the Suite contains other Suites.
            </dd>
            <dt>Test Case</dt>
            <dd>
                Logic View:
                A Test Case is a Method in a Fixture that when executed performs a test.
                <br />
                Physical View:
                A Test Case is a function annotated with <code>A_Test</code>.
            </dd>
            <dt>Test Case Setup</dt>
            <dd>
                Logic View:
                The Test Case Setup is a prepartion / cleanup for all test cases of a fixture that is executed before / after each test case of that fixture.
                <br />
                Physical View:
                The Test Case Setup preparation steps are Methods annotated with <code>A_Before</code>.
                The Test Case Setup cleanup steps are Methods annotated with <code>A_After</code>.
                <br />
                Note:
                This corresponds to <code>setUp()</code> / <code>tearDown()</code> in older frameworks.
            </dd>
        </dl>
    </body>
</html>
